package com.etc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.etc.entity.Restaurant;
@Repository
public interface RestaurantMapper {
    int deleteByPrimaryKey(Integer rid);

    int insert(Restaurant record);

    int insertSelective(Restaurant record);

    Restaurant selectByPrimaryKey(Integer rid);

    int updateByPrimaryKeySelective(Restaurant record);

    int updateByPrimaryKey(Restaurant record);
    /**
     * 查询所有餐厅信息
     * @param start
     * @param limit
     * @return
     */
	public List<Restaurant> getRestaurants();

	 public int getCount();
	 /**
	  * 商家查询自己的所有餐厅信息
	  * @param start
	  * @param pagesize
	  * @param uid
	  * @return
	  */
	 public List<Restaurant> getRestaurantsByuid(@Param("start")Integer start, @Param("pagesize") Integer pagesize,@Param("uid") Integer uid);

	List<Restaurant> getRestaurants2(@Param("uid") int uid);

	List<Restaurant> getRestaurantByPage(@Param("start")Integer start,@Param("limit") Integer limit);
}